<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta charset="utf-8" />
  <title>MapViewer hosted in a WPF</title>
  <style>
    table, th, td {
      border: 1px solid black;
      border-collapse: collapse;
    }
    th, td {
      padding: 5px;
    }
    th {
      font-weight: bold;
    }
  </style>
</head>
<body>
  ## MapViewer hosted in a WPF

Microsoft's Windows Presentation Foundation (WPF) provides the facility to host Windows Forms controls within a WPF application. This sample demonstrates how to host the ArcGIS Engine Map control, Toolbar control, and TOC control on a WPF window by using the WindowsFormsHost control. A combination of code and Extensible Application Markup Language (XAML) is used to view a map inside the WPF application.  

```
Language:              C#, VB
Subject:               Controls
Organization:          Esri, http://www.esri.com
Date:                  10/17/2019
ArcObjects SDK:        10.8
Visual Studio:         2017, 2019
.NET Target Framework: 4.5
```

### Resources

* [ArcObjects .NET API Reference online](http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm)  
* [Sample Data Download](../../releases)  
* [What's new](http://desktop.arcgis.com/en/arcobjects/latest/net/webframe.htm#91cabc68-2271-400a-8ff9-c7fb25108546.htm)  
* [Download the ArcObjects SDK for .Net from MyEsri.com](https://my.esri.com/)  

### Usage
1. Start Visual Studio and open the solution.  
1. Press F5 to build and run the project.  
1. Click Open on the toolbar to load a .mxd file onto the map or click Add Data to browse to the data.  

#### See Also  
[How to host an ArcGIS Engine MapControl in a WPF application](http://desktop.arcgis.com/search/?q=How%20to%20host%20an%20ArcGIS%20Engine%20MapControl%20in%20a%20WPF%20application&p=0&language=en&product=arcobjects-sdk-dotnet&version=&n=15&collection=help)  
[WindowsClient.NET](http://desktop.arcgis.com/search/?q=WindowsClient.NET&p=0&language=en&product=arcobjects-sdk-dotnet&version=&n=15&collection=help)  
[Walkthrough: Hosting a Windows Forms Composite Control in Windows Presentation Foundation](http://desktop.arcgis.com/search/?q=Walkthrough%3A%20Hosting%20a%20Windows%20Forms%20Composite%20Control%20in%20Windows%20Presentation%20Foundation&p=0&language=en&product=arcobjects-sdk-dotnet&version=&n=15&collection=help)  

---------------------------------

#### Licensing  
<table><tr><th> Development licensing </th><th> Deployment licensing </th></tr>
<tr><td> Engine Developer Kit </td><td> Engine </td></tr>  
<tr><td>  </td><td> ArcGIS Desktop Basic </td></tr>  
<tr><td>  </td><td> ArcGIS Desktop Standard </td></tr>  
<tr><td>  </td><td> ArcGIS Desktop Advanced </td></tr>  
</table>
</body>
</html>